package com.shuimutong.gutil.reflection;

import java.util.Set;

import org.reflections.Reflections;

/**
 * 包扫描util
 * @ClassName:  PackageScanUtil   
 * @Description:(这里用一句话描述这个类的作用)   
 * @author: 水木桶
 * @date:   2019年9月7日 下午4:09:15     
 * @Copyright: 2019 [水木桶]  All rights reserved.
 */
public class PackageScanUtil {
	/**
	 * 获取指定包名下、指定注解的类
	 * @param packageName
	 * @param annotationClazz
	 * @return
	 */
	public static Set<Class<?>> scanAnnotationClass(String packageName, Class annotationClazz) {
		Reflections reflections = new Reflections(packageName);
		Set<Class<?>> annotatedWithIbusinessInitClasses = reflections
				.getTypesAnnotatedWith(annotationClazz);
		return annotatedWithIbusinessInitClasses;
	}
}
